Integrand size = 25, antiderivative size = 266 \[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=-\frac {(a+b x)^{1+m} (c+d x)^{1+n} (b c f h (2+m)+a d f h (2+n)-b d (f g+e h) (3+m+n)-b d f h (2+m+n) x)}{b^2 d^2 (2+m+n) (3+m+n)}+\frac {\left (a^2 d^2 f h (1+n) (2+n)+a b d (1+n) (2 c f h (1+m)-d (f g+e h) (3+m+n))+b^2 \left (c^2 f h (1+m) (2+m)-c d (f g+e h) (1+m) (3+m+n)+d^2 e g (2+m+n) (3+m+n)\right )\right ) (a+b x)^{1+m} (c+d x)^n \left (\frac {b (c+d x)}{b c-a d}\right )^{-n} \operatorname {Hypergeometric2F1}\left (1+m,-n,2+m,-\frac {d (a+b x)}{b c-a d}\right )}{b^3 d^2 (1+m) (2+m+n) (3+m+n)} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 266, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {152, 72, 71} \[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\frac {(a+b x)^{m+1} (c+d x)^n \left (\frac {b (c+d x)}{b c-a d}\right )^{-n} \operatorname {Hypergeometric2F1}\left (m+1,-n,m+2,-\frac {d (a+b x)}{b c-a d}\right ) \left (a^2 d^2 f h (n+1) (n+2)+a b d (n+1) (2 c f h (m+1)-d (m+n+3) (e h+f g))+b^2 \left (c^2 f h (m+1) (m+2)-c d (m+1) (m+n+3) (e h+f g)+d^2 e g (m+n+2) (m+n+3)\right )\right )}{b^3 d^2 (m+1) (m+n+2) (m+n+3)}-\frac {(a+b x)^{m+1} (c+d x)^{n+1} (a d f h (n+2)+b c f h (m+2)-b d (m+n+3) (e h+f g)-b d f h x (m+n+2))}{b^2 d^2 (m+n+2) (m+n+3)} \]
[In]
[Out]
Rule 71
Rule 72
Rule 152
Rubi steps \begin{align*} \text {integral}& = -\frac {(a+b x)^{1+m} (c+d x)^{1+n} (b c f h (2+m)+a d f h (2+n)-b d (f g+e h) (3+m+n)-b d f h (2+m+n) x)}{b^2 d^2 (2+m+n) (3+m+n)}+\frac {\left (a^2 d^2 f h (1+n) (2+n)+a b d (1+n) (2 c f h (1+m)-d (f g+e h) (3+m+n))+b^2 \left (c^2 f h (1+m) (2+m)-c d (f g+e h) (1+m) (3+m+n)+d^2 e g (2+m+n) (3+m+n)\right )\right ) \int (a+b x)^m (c+d x)^n \, dx}{b^2 d^2 (2+m+n) (3+m+n)} \\ & = -\frac {(a+b x)^{1+m} (c+d x)^{1+n} (b c f h (2+m)+a d f h (2+n)-b d (f g+e h) (3+m+n)-b d f h (2+m+n) x)}{b^2 d^2 (2+m+n) (3+m+n)}+\frac {\left (\left (a^2 d^2 f h (1+n) (2+n)+a b d (1+n) (2 c f h (1+m)-d (f g+e h) (3+m+n))+b^2 \left (c^2 f h (1+m) (2+m)-c d (f g+e h) (1+m) (3+m+n)+d^2 e g (2+m+n) (3+m+n)\right )\right ) (c+d x)^n \left (\frac {b (c+d x)}{b c-a d}\right )^{-n}\right ) \int (a+b x)^m \left (\frac {b c}{b c-a d}+\frac {b d x}{b c-a d}\right )^n \, dx}{b^2 d^2 (2+m+n) (3+m+n)} \\ & = -\frac {(a+b x)^{1+m} (c+d x)^{1+n} (b c f h (2+m)+a d f h (2+n)-b d (f g+e h) (3+m+n)-b d f h (2+m+n) x)}{b^2 d^2 (2+m+n) (3+m+n)}+\frac {\left (a^2 d^2 f h (1+n) (2+n)+a b d (1+n) (2 c f h (1+m)-d (f g+e h) (3+m+n))+b^2 \left (c^2 f h (1+m) (2+m)-c d (f g+e h) (1+m) (3+m+n)+d^2 e g (2+m+n) (3+m+n)\right )\right ) (a+b x)^{1+m} (c+d x)^n \left (\frac {b (c+d x)}{b c-a d}\right )^{-n} \, _2F_1\left (1+m,-n;2+m;-\frac {d (a+b x)}{b c-a d}\right )}{b^3 d^2 (1+m) (2+m+n) (3+m+n)} \\ \end{align*}
Time = 0.22 (sec) , antiderivative size = 195, normalized size of antiderivative = 0.73 \[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\frac {(a+b x)^{1+m} (c+d x)^n \left (\frac {b (c+d x)}{b c-a d}\right )^{-n} \left ((b c-a d)^2 f h \operatorname {Hypergeometric2F1}\left (1+m,-2-n,2+m,\frac {d (a+b x)}{-b c+a d}\right )+b \left (-\left ((b c-a d) (2 c f h-d (f g+e h)) \operatorname {Hypergeometric2F1}\left (1+m,-1-n,2+m,\frac {d (a+b x)}{-b c+a d}\right )\right )+b (d e-c f) (d g-c h) \operatorname {Hypergeometric2F1}\left (1+m,-n,2+m,\frac {d (a+b x)}{-b c+a d}\right )\right )\right )}{b^3 d^2 (1+m)} \]
[In]
[Out]
\[\int \left (b x +a \right )^{m} \left (d x +c \right )^{n} \left (f x +e \right ) \left (h x +g \right )d x\]
[In]
[Out]
\[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\int { {\left (f x + e\right )} {\left (h x + g\right )} {\left (b x + a\right )}^{m} {\left (d x + c\right )}^{n} \,d x } \]
[In]
[Out]
Exception generated. \[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\text {Exception raised: HeuristicGCDFailed} \]
[In]
[Out]
\[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\int { {\left (f x + e\right )} {\left (h x + g\right )} {\left (b x + a\right )}^{m} {\left (d x + c\right )}^{n} \,d x } \]
[In]
[Out]
\[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\int { {\left (f x + e\right )} {\left (h x + g\right )} {\left (b x + a\right )}^{m} {\left (d x + c\right )}^{n} \,d x } \]
[In]
[Out]
Timed out. \[ \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx=\int \left (e+f\,x\right )\,\left (g+h\,x\right )\,{\left (a+b\,x\right )}^m\,{\left (c+d\,x\right )}^n \,d x \]
[In]
[Out]